package com.leizi.igym.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.leizi.igym.domain.Category;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-04-08  20:43
 * @Description:
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "分类返回的数据格式")
public class CategoryVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 3630179253784804649L;

    @Schema(name = "主键值")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(name = "分类父id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    @Schema(name = "分类父名")
    private String parentName;

    @Schema(name = "分类描述")
    private String descrip;

    @Schema(name = "分类名称")
    private String categoryName;

    @Schema(name = "子分类列表")
    private List<Category> childCategory;
}
